import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
  {
    path: '/',
    name: 'layout',
    redirect: '/storage-monitoring',
    component:  () => import('@/Layout/index.vue'),
    children: [
        {
            path: '/storage-monitoring',
            name: 'storage-monitoring',
            component:  () => import('@/views/storage-monitoring/index.vue'),
        },
        {
            path: '/storage-monitoring/data',
            name: 'storage-monitoring-data',
            meta: {
                title: '储能数据'
            },
            component:  () => import('@/views/storage-monitoring/data.vue'),
        },
        {
            path: '/station/data',
            name: 'station-data',
            meta: {
                title: '场站基本数据'
            },
            component:  () => import('@/views/station/data.vue'),
        },
        {
            path: '/photovoltaic-forecast/real-time',
            name: 'photovoltaic-real-time-forecast',
            component:  () => import('@/views/photovoltaic-forecast/real-time.vue'),
        },
        {
            name: 'photovoltaic-forecast-data',
            path: '/photovoltaic-forecast/data',
            component:  () => import('@/views/photovoltaic-forecast/data.vue'),
        },
        {
            name: 'photovoltaic-day-forecast',
            path: '/photovoltaic-forecast/day',
            component:  () => import('@/views/photovoltaic-forecast/day.vue'),
        },
        {
            name: 'photovoltaic-storage-coordination',
            path: '/photovoltaic-storage-coordination',
            component:  () => import('@/views/photovoltaic-storage-coordination/index.vue'),
        },
        {
            name: 'photovoltaic-storage-coordination-data',
            path: '/photovoltaic-storage-coordination/data',
            component:  () => import('@/views/photovoltaic-storage-coordination/data.vue'),
        },
        /**
         * {
         *                 name: '温度数据',
         *                 code: 'temperature-data',
         *             },
         *             {
         *                 name: '气压数据',
         *                 code: 'pressure-data',
         *             },
         *             {
         *                 name: '湿度数据',
         *                 code: 'humidity-data',
         *             },
         *             {
         *                 name: '辐照度数据',
         *                 code: 'radiation-data',
         *             },
         *             {
         *                 name: '总光伏功率数据',
         *                 code: 'total-photovoltaic-power-data',
         *             },
         *             {
         *                 name: '储能无功数据',
         *                 code: 'storage-reactive-power-data',
         *             },
         *             {
         *                 name: '储能有功数据',
         *                 code: 'storage-active-power-data',
         *             },
         *             {
         *                 name: '可充电量数据',
         *                 code: 'rechargeable-amount-data',
         *             },
         *             {
         *                 name: '可放电量数据',
         *                 code: 'dischargeable-amount-data',
         *             },
         *             {
         *                 name: '电池荷电量数据',
         *                 code: 'battery-charge-amount-data',
         *             }
         */
        {
            name: 'temperature-data',
            path: '/temperature-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'pressure-data',
            path: '/pressure-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'humidity-data',
            path: '/humidity-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'radiation-data',
            path: '/radiation-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'total-photovoltaic-power-data',
            path: '/total-photovoltaic-power-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'storage-reactive-power-data',
            path: '/storage-reactive-power-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'storage-active-power-data',
            path: '/storage-active-power-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'rechargeable-amount-data',
            path: '/rechargeable-amount-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'dischargeable-amount-data',
            path: '/dischargeable-amount-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'battery-charge-amount-data',
            path: '/battery-charge-amount-data',
            component:  () => import('@/views/data-query/index.vue'),
        },
        {
            name: 'data-query-data',
            path: '/data-query/data',
            component:  () => import('@/views/data-query/data.vue'),
        },
        {
            name: 'alarm-data',
            path: '/alarm/data',
            component:  () => import('@/views/alarm/data.vue'),
        },
        {
            name: 'system-data',
            path: '/system/data',
            component:  () => import('@/views/system/data.vue'),
        },
        {
            name: 'system-diagram',
            path: '/system/diagram',
            component:  () => import('@/views/system/index.vue'),
        },
        {
            name: 'alarm-history',
            path: '/alarm/history',
            component:  () => import('@/views/alarm/history.vue'),
        },
        {
            name: 'role',
            path: '/role',
            component:  () => import('@/views/role/index.vue'),
        },
        {
            name: 'roleSave',
            path: '/role/Save/:id',
            component:  () => import('@/views/role/Save.vue'),
        },
        {
            name: 'user',
            path: '/user',
            component:  () => import('@/views/user/index.vue'),
        },
        {
            name: 'userSave',
            path: '/user/Save/:id',
            component:  () => import('@/views/user/Save.vue'),
        },
        // 报表
        {
            // 报表电量
            name: 'report-electricity',
            path: '/report/electricity',
            component:  () => import('@/views/report/electricity.vue'),
        },
        {
            // 报表-光伏预测
            name: 'report-pv-forecast',
            path: '/report/pv-forecast',
            component:  () => import('@/views/report/pv-forecast.vue'),
        },
        {
            // 报表-光伏预测
            name: 'report-pv-forecast-day',
            path: '/report/pv-forecast-day',
            component:  () => import('@/views/report/pv-forecast-day.vue'),
        },
        {
            // 报表-光储协调
            name: 'report-pv-storage-coordination',
            path: '/report/pv-storage-coordination',
            component:  () => import('@/views/report/pv-storage-coordination.vue'),
        },
        {
            // 报表-光储协调
            name: 'report-pv-storage-coordination-day',
            path: '/report/pv-storage-coordination-day',
            component:  () => import('@/views/report/pv-storage-coordination-day.vue'),
        },
        {
            // 报表-数据查询
            name: 'report-data-query',
            path: '/report/data-query',
            component:  () => import('@/views/report/data-query.vue'),
        }
    ]
  },
    {
        path: '/login',
        name: 'login',
        component:  () => import('@/views/Login.vue'),
    }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
